package cn.iocoder.yudao.module.product.sku.vo;

import cn.iocoder.yudao.module.api.product.sku.dto.ProductPropertyValueRespDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.PositiveOrZero;
import lombok.Data;

import java.util.List;

@Schema(description = "用户 APP - 产品 SKU 创建/更新 Request VO")
@Data
public class AppProductSkuSaveReqVO {

    @Schema(description = "产品 SKU 名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "清凉小短袖")
    @NotEmpty(message = "产品 SKU 名字不能为空")
    private String name;

    @Schema(description = "销售价，单位：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1999")
    @NotNull(message = "销售价不能为空")
    private Integer price;

    @Schema(description = "成本价，单位：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "19")
    @NotNull(message = "成本价不能为空")
    private Integer costPrice;

    @Schema(description = "市场价，单位：分", example = "2999")
    private Integer marketPrice;

    @Schema(description = "会员价，单位：分", example = "1999")
    private Integer vipPrice;

    @Schema(description = "厂家零售价，单位：分。如果填写了则支持零售，不填则只支持批发。", example = "2999")
    @PositiveOrZero
    private Integer wholesaleForRetailPrice;

    @Schema(description = "条形码", example = "15156165456")
    private String barCode;

    @Schema(description = "图片地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.example.com/xx.png")
    @NotNull(message = "图片地址不能为空")
    private String picUrl;

    @Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "200")
    @NotNull(message = "库存不能为空")
    private Integer stock;

    @Schema(description = "产品重量,单位：kg 千克", example = "1.2")
    private Double weight;

    @Schema(description = "产品体积,单位：m^3 平米", example = "2.5")
    private Double volume;

    @Schema(description = "一级分销的佣金，单位：分", example = "199")
    private Integer firstBrokeragePrice;

    @Schema(description = "二级分销的佣金，单位：分", example = "19")
    private Integer secondBrokeragePrice;

    @Schema(description = "属性数组")
    private List<ProductPropertyValueRespDTO> properties;

}
